package com.abo.yaas.webservice.hibernate;

import javax.persistence.EntityManager;

public class EntityManagerUtils {
    private static final ThreadLocal<EntityManager> entityManager = new ThreadLocal<EntityManager>();

    public static EntityManager getEntityManager() {
        return entityManager.get();
    }

    public static void removeEntityManager() {
        entityManager.remove();
    }

    public static void setEntityManager(final EntityManager manager) {
        entityManager.set(manager);
    }
}
